public class Trystr{
	public static void main(String[] arg){
		String s1 = "oops";
		String s2 = "oops";
		System.out.println(s1 == s2);
		System.out.println(s1.equals(s2));

		String s3 = new String("haha");
		char c[] = {'h','a','h','a'};
		String s4 = new String(c);
		System.out.println(s3 == s4);
		System.out.println(s3.equals(s4));


		s1 = "haha";
		System.out.println(s3 == s1);
		System.out.println(s3.equals(s1));


		String s5 = new String(c, 2, 2);
		System.out.println(s5);
	}
}